import React, { Component } from 'react';
import { connect } from 'react-redux';

class Home extends Component {

    handleTakeEvery = () => {
        this.props.dispatch({
            type: 'takeEvery'
        })
    }
    handleTakeLatest = () => {
        this.props.dispatch({
            type: 'takeLatest'
        })
    }
    handleThrottle = () => {
        this.props.dispatch({
            type: 'throttle'
        })
    }

    render() {
        return (
            <div>
                <button onClick={this.handleTakeEvery}>点击发送takeEvery</button>
                <button onClick={this.handleTakeLatest}>点击发送takeLatest</button>
                <button onClick={this.handleThrottle}>点击发送Throttle</button>
            </div>
        );
    }
}

export default connect()(Home)
